import { stringify } from 'qs';
import request from '@/utils/request'; 
import { async } from 'q';
 
//告警列表
export async function queryWarnings(params) {
	let url = '/iot/dmp/v1/warning/list'
	return request(url, {
		method: 'POST',
		body: {
			...params
		},
	});
}
//告警详情
export async function getDetail(params) {
	return request(`/iot/workflow/v1/workflow/tasklist-complete/${params.taskId}`, {
		method: 'get'
	})
}

//动态记录
export async function getEventLog(params) {
	return request('/iot/dmp/v1/taskLog/list', {
		method: 'POST',
		body: {
			...params
		}
	})
} 

//流程图
export async function getWorkflow(params) {
	const url = `/iot/workflow/v1/workflow/generateImage/${params.process_instance_id}`;
	//console.log(params)
	return request(url, {
	  reuqestImage :true,
	  method: 'get'
	})
}


